/*
 * LangString.java
 *
 * Created on 29 de Agosto de 2007, 16:47
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package br.ufal.ic.editorLOM.elementosBasicos;

import org.jdom.Attribute;

/**
 *
 * @author Alexsander
 */
public class LangString extends Elemento{
    
    private Elemento string;
    private Attribute lang;
    
    /**
     * Creates a new instance of LangString
     */
    public LangString(String nome) {
        super(nome);
        this.string = new Elemento("string");
        this.lang = new Attribute("language","");
    }
    
    //----------------------------------------------------------
    
    public void atribuirTexto(String texto) {
        this.string.setText(texto);
    }
    
    public void atribuirIdioma(String idioma) {
        this.lang.setValue(idioma);
    }
    
    //----------------------------------------------------------
    
    public void montar() {
        this.string.setAttribute(this.lang);
        
        this.adicionarConteudo(this.string);
    }
    
    
    
}
